.PHONY:all
all:
	@cd ./compile_server;\
	g++ -o compile_server compile.cpp -ljsoncpp -lpthread;\
	cd -;\
	cd ./oj_server;\
	g++ -o oj_server oj_server.cpp -lpthread  -lctemplate -ljsoncpp;\
	cd -;\

.PHONY:output
output:
	mkdir -p output/compile_server;
	cp ./compile_server/compile_server output/compile_server;
	cp  -rf ./compile_server/temp output/compile_server;
	mkdir output/oj_server;
	cp ./oj_server/oj_server output/oj_server;
	cp -rf ./oj_server/conf output/oj_server;
	cp -rf ./oj_server/html_ctemplate output/oj_server;
	cp -rf ./oj_server/questions output/oj_server;
	cp -rf ./oj_server/web output/oj_server;
	cp -rf ./include output;
	cp -rf ./lib output; 

.PHONY:clean
clean:
	rm -rf ./compile_server/compile_server ./oj_server/oj_server ./output 